/*
 * @ author madman 
 * @ use 基本参数schema
 */
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const SystemSchema = new Schema({
    _id: {
        type: String,
        default: "SYS",
        required: true
    },
    setup: {
        //网站名称
        name: {
            type: String,
            default: ""
        },
        //关键词
        keywords: {
            type: String,
            default: ""
        },
        //网站介绍
        description: {
            type: String,
            default: ""
        },
        // 服务器地址
        serverUrl: {
            type: String
        },
        // 文件上传方式
        upload_type:{
            type: String,
            default: "1"
        },
        //微信
        weixin: {
            type: String,
            default: ""
        },
        //电话
        tel: {
            type: String,
            default: ""
        },
        //邮箱
        email: {
            type: String,
            default: ""
        },
        //版权信息
        copyright: {
            type: String,
            default: ""
        },
        //底部信息
        bottomInfo: {
            type: String,
            default: ""
        }
    },
    qiniu: {
        //七牛云 access_key
        access_key: {
            type: String,
            default: ""
        },
        //七牛云 secret_key
        secret_key: {
            type: String,
            default: ""
        },
        //七牛云 bucket
        bucket: {
            type: String,
            default: ""
        },
        //七牛云 bucket_url
        bucket_url: {
            type: String,
            default: ""
        }
    },
    weixinpay: {
        //商户号ID
        mch_id: {
            type: String,
            default: ""
        },
        //商户KEY
        key: {
            type: String,
            default: ""
        }
    },
    weixin: {
        //APPID
        appid: {
            type: String,
            default: ""
        },
        //appsecret
        appsecret: {
            type: String,
            default: ""
        },
    }
});
module.exports = mongoose.model('j_system', SystemSchema, 'j_system');